#!/usr/bin/env python
# encoding: utf-8
# @Time : 2020/7/25 22:15 
# @Author : 能量咖啡豆 
# @File : usda.py 
# @desc : usda.py 
import json
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

if __name__ == "__main__":
    print("usda data anaylisis")
    fig = plt.figure()
    ax1 = fig.add_subplot(2, 2, 1)
    ax2 = fig.add_subplot(2, 2, 2)
    ax3 = fig.add_subplot(2, 2, 3)
    ax4 = fig.add_subplot(2, 2, 4)


    #ax1.plot(np.random.randn(50).cumsum(), 'k--', label='one')
    #ax1.plot(np.random.randn(50).cumsum(), 'k', label='two')
    #ax1.plot(np.random.randn(50).cumsum(), 'k.', label='three')
    #ax1.legend(loc="best")

    #ax2.scatter(np.arange(30), np.arange(30) + 3 * np.random.randn(30))
    #ax3.hist(np.random.randn(100), bins=20, color='k', alpha=0.3)
    #ax4.plot(np.random.randn(1000).cumsum())

    df = pd.DataFrame(np.random.randn(10,4).cumsum(0),
                      columns=['A','B','C','D'],
                      index=np.arange(0, 100, 10))

    df.plot(ax=ax1)
    df.plot(ax=ax2)
    plt.show()
